using System;
using System.Windows.Forms;
using RentalOfCars.Client.Presentation;

namespace RentalOfCars.Client.WinformsClient
{
    public class Messenger : IMessenger
    {
        #region IMessenger Members

        public void ShowError(string message)
        {
            MessageBox.Show(message, @"Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
        }

        public bool ShowQuestion(string message)
        {
            return MessageBox.Show(message, @"Question", MessageBoxButtons.YesNo, MessageBoxIcon.Question) ==
                   DialogResult.Yes;
        }

        public void ShowInformation(string message)
        {
            MessageBox.Show(message, @"Error", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }

        #endregion
    }
}